import Vue from 'vue'
import Router from 'vue-router'
import Home from '../page/Home.vue'
import Index from '../page/Index.vue'
import Login from '../page/Login.vue'
import News from '../page/News.vue'
import Questionanire from '../page/questionaire.vue'
import Store from '../page/Store.vue'
import System from '../page/System.vue'
import Result from '../page/Result.vue'

Vue.use(Router)

export default new Router({
  mode:'history',
  routes: [
    {
      path: '/',
      name: 'index',
      component: Index,
      redirect:'/home',
      children:[
        {
          path:'home',
          name:'home',
          component:Home
        },
        {
          path:'news',
          name:'news',
          component:News
        },
        {
          path:'system',
          name:'system',
          component:System
        },
        {
          path:'store',
          name:'store',
          component:Store
        },
      ]
    },
    {
      path:'/login',
      name:'login',
      component:Login
    },
    {
      path:'/questionaire',
      name:'questionaire',
      component:Questionanire
    },
    {
      path:'*',
      redirect:'/home'
    },
    {
      path:'/result',
      component:Result
    }
  ]
})
